/**
 * @Author: 曹钰林
 * @Date: 2019/10/12
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 分页查询列表
export const searchByPage = params => axios.get(`${SERVER.MEMBERS_CLUB}/management/discountsGrant/searchByPage`, { params });

// 删除
export const deleteById = params => axios.get(`${SERVER.MEMBERS_CLUB}/management/discountsGrant/deleteById`, { params });

// 根据主id查询项目/备件明细
export const searchByMainId = params => axios.get(`${SERVER.MEMBERS_CLUB}/management/discountsGrant/searchByMainId`, { params });

// 保存或编辑
export const saveOrUpdate = params => axios.post(`${SERVER.MEMBERS_CLUB}/management/discountsGrant/saveOrUpdate`, params);

// 批量发放优惠包 按卡类别或者会员保存
export const batchSave = params => axios.post(`${SERVER.MEMBERS_CLUB}/management/discountsGrant/batchSave`, params);

// 选择已办理的会员卡信息
export const searchMembers = params => axios.get(`${SERVER.MEMBERS_CLUB}/management/discountsGrant/searchMembers`, { params });

// 确认信息
export const sure = params => axios.get(`${SERVER.MEMBERS_CLUB}/management/discountsGrant/sure`, { params });
// 获取人员权限
export const staffAuthority = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getMembersByUserId`, { params });

// 下载优惠包发放记录
export const downloadMemberDiscountPackageAccount = params => axios.get(`${SERVER.MEMBERS_CLUB}/membersAlliance/downloadMemberDiscountPackageAccount`, { params });
